package com.wk.code.wkserver.controller.app;

import com.wk.code.wkserver.controller.common.BaseController;
import com.wk.code.wkserver.request.app.FeedbackRequest;
import com.wk.code.wkserver.response.result.R;
import com.wk.code.wkserver.service.IFeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author: wangqiang
 * @create: 2021-08-23 13:46
 */
@RestController
@RequestMapping("/feedback")
@Api(tags = "app-用户反馈管理")
public class FeedbackController extends BaseController {

    @Resource
    private IFeedbackService feedbackService;

    /**
     * 反馈
     *
     * @param request 请求参数
     * @return R
     */
    @ApiOperation(value = "反馈")
    @PostMapping("/save")
    public R<Void> save(@RequestBody FeedbackRequest request) {
        feedbackService.save(getUserId(), request);
        return R.success();
    }
}
